<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container {
            border: 5px solid green;
        }
        span {
            border: 1px solid #000;
            background-color: pink;
        }
        .span1 {
            margin-top: 20px;
        }
        .span2 {
            margin-bottom: 20px;
            /* 如果浮动打乱顺序 */
            /* float: left; */
        }
        .span3 {
            padding-top: 20px;
        }
        .span4 {
            padding-bottom: 20px;
        }
        .span5 {
            display: inline-block;
            /* 父盒子的高度由最高的盒子决定1 */
            height: 70px;
        }
        .box1 {
            width: 100px;
            height: 100px;
            background-color: pink;
            word-wrap: break-word;
            display: inline-block;
        }
        .box2 {
            padding-bottom: 100px;
            background-color: gold;
            display: inline-block;
        }
        .box3 {
            width: 100px;
            padding-bottom: 50px;
            background-color: skyblue;
            display: inline-block;
        }
        .span6 {
            background-color: yellowgreen;
        }
    </style>
</head>
<body>
    <!-- 插入块元素：将切割IFC，切割后与块元素并列 -->
    <div class="container">
        <span class="span1">span1</span>
        <span class="span2">span2</span>
        <span class="span3">span3</span>
        <!-- 插入元素 -->
        <div></div>
        <span class="span4">span4</span>
        <span class="span5">span5</span>     
    </div>
    <!-- 基线 -->
    <!-- 在IFC下 -->
    <!-- 1.inline元素基线的边缘时content-box -->
    <!-- 2.inline-block元素基线的边缘时margin-box -->
    <!-- 3.inline-block元素如果没有内容，则与基线下边界对齐 -->
    <!-- 4.inline-block元素如果有内容，则基线与内容对齐 -->
    <!-- 5.inline-block元素如果有多行内容，则基线与最后一行内容的基线对齐 -->

    <div class="container">
        <div class="box1">111111111111111gggggggggggggggggg</div>
        <div class="box2">22222gggg</div>
        <div class="box3"></div>
        <span class="span6">33333ggggg</span>
    </div>
</body>
</html>